﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/Site.Master" AutoEventWireup="true"
    CodeBehind="FileUpLoad.aspx.cs" Inherits="BugSysSolution.FileUpLoad" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="height: 440px;overflow-y:auto">
        <table class="tab" style="height:30px">
            <tr>
                <td>文件上传
                </td>
                <td>
                    <asp:FileUpload ID="up_file" runat="server" />
                    <asp:Button runat="server" ID="btn_files" Text="上传" CssClass="btn"
                        OnClick="btn_files_Click" OnClientClick="return clientclick();" />
                </td>
            </tr>
        </table>
        <table class="tab">
            <asp:Repeater ID="rep1" runat="server">
                <HeaderTemplate>
                    <tr>
                        <td>Id
                        </td>
                        <td>Name
                        </td>
                        <td>User
                        </td>
                        <td>Down(<span style="color: Red">右键Save as</span>)
                        </td>
                    </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td><%# Eval("Id")%></td>
                        <td><%# Eval("FileName")%></td>
                        <td><%# Eval("CreateUser")%></td>
                        <td><a href='<%# Eval("FileUrl")%>' target="_blank">Down</a></td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>

        </table>
        <webdiyer:AspNetPager ID="Pager" runat="server" PageIndexBoxType="TextBox" ShowPageIndexBox="Never"
            SubmitButtonText="" TextAfterPageIndexBox="" TextBeforePageIndexBox="" CurrentPageButtonPosition="End"
            ShowCustomInfoSection="Right" CustomInfoHTML="共%PageCount%页，当前为第%CurrentPageIndex%页，每页%PageSize%条"
            FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" OnPageChanged="Pager_PageChanged"
            PrevPageText="上一页" Direction="LeftToRight" ShowMoreButtons="False" ShowPageIndex="False"
            HorizontalAlign="Right" PageSize="4">
        </webdiyer:AspNetPager>
    </div>
    <script type="text/javascript">
        function clientclick() {
            var val = $("#ctl00_ContentPlaceHolder1_up_file").val();
            if (val == "") {
                return false;
            }
            return true;
        }
    </script>
</asp:Content>
